package com.rongc.client.freight.base.view.activity;

import android.animation.ObjectAnimator;
import android.widget.ImageView;

import com.rongc.client.core.utils.ActivityUtils;
import com.rongc.client.freight.R;
import com.rongc.client.freight.base.BaseActivity;

import butterknife.Bind;

/**
 * Created by ccqx on 2017/8/26.
 */

public class LaunchActivity extends BaseActivity {
    @Bind(R.id.iv_bg)
    ImageView mIvBg;

    @Override
    public void initView() {
        ObjectAnimator animator = ObjectAnimator.ofFloat(mIvBg,"alpha",0f,1f);
        animator.setDuration(2000);
        animator.start();

        getWindow().getDecorView().postDelayed(new Runnable() {
            @Override
            public void run() {
                ActivityUtils.startActivity(LaunchActivity.this,LoginActivity.class);
                finish();
            }
        },2000);
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_launch;
    }
}
